import { IsEmail, IsNotEmpty, MaxLength } from 'class-validator';

export class SignUpDto {
  @MaxLength(20, {
    message: '用户名最大不能超过20字符',
  })
  @IsNotEmpty({ message: '用户名不为空' })
  username: string;

  @IsNotEmpty({ message: '密码不为空' })
  password: string;

  @IsEmail({}, { message: '邮箱格式不正确' })
  email: string;
}
